import { request } from './request';

export const Api = {
  getTruckList: (params?: any) =>
    request.get('/api/truckType/list', {
      params,
    }),
  deleteTruck: (id: string) => request.delete(`/api/truck/${id}`),

  supplierList: (params?: any) =>
    request.get('/api/supplier/list', {
      params,
    }),

  deleteSuppliers: (ids: string[]) =>
    request.delete(`/api/supplier`, {
      data: { ids },
    }),

  oemList: (params?: any) =>
    request.get('/api/oem/list', {
      params,
    }),

  deleteOems: (ids: string[]) =>
    request.delete(`/api/oem`, {
      data: { ids },
    }),

  dockList: (params?: any) =>
    request.get('/api/dock/list', {
      params,
    }),

  deleteDocks: (ids: string[]) =>
    request.delete(`/api/dock`, {
      data: { ids },
    }),

  orgnizeList: (params?: any) =>
    request.get('/api/orgnize/list', {
      params,
    }),

  deleteOrgnizes: (ids: string[]) =>
    request.delete(`/api/orgnize`, {
      data: { ids },
    }),

  userList: (params?: any) =>
    request.get('/api/user/list', {
      params,
    }),

  deleteUser: (id: string) =>
    request.delete(`/api/user`, {
      data: { id },
    }),

  getMatrixList: (params?: any) =>
    request.get('/api/matrix/list', {
      params,
    }),

  getWorkPeriodList: (params?: any) =>
    request.get('/api/workPeriod/list', {
      params,
    }),
};

export default Api;
